package com.itheima.utils;

public class CurrentHolder {

    private static ThreadLocal<Integer> TL = new ThreadLocal<>();


    public static Integer getUserId() {
        return TL.get();
    }

    public static void setUserId(Integer userId) {
        TL.set(userId);
    }


    public static void removeUserId() {
        TL.remove();
    }
}